/*
 * Copyright (c) 2014 Strong Group - 版权所有
 * 
 * This software is the confidential and proprietary information of
 * Strong Group. You shall not disclose such confidential information 
 * and shall use it only in accordance with the terms of the license 
 * agreement you entered into with www.cnstrong.cn.
 */
package com.zuorenke.serialize.support.hessian;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import com.zuorenke.serialize.ObjectInput;
import com.zuorenke.serialize.ObjectOutput;
import com.zuorenke.serialize.Serialization;

/**
 *
 * 描述:
 *
 * @author  WQB
 * @created 2014-4-7 上午10:13:26
 * @since   v1.0.0
 */
public class Hessian2Serialization implements Serialization {

	public static final byte ID = 2;

	public byte getContentTypeId() {
		return ID;
	}

	public String getContentType() {
		return "x-application/hessian2";
	}

	public ObjectOutput serialize(OutputStream out) throws IOException {
		return new Hessian2ObjectOutput(out);
	}

	public ObjectInput deserialize(InputStream is) throws IOException {
		return new Hessian2ObjectInput(is);
	}

}